package net.wanho.service.impl;

import lombok.RequiredArgsConstructor;
import net.wanho.entity.User;
import net.wanho.mapper.UserMapper;
import net.wanho.service.UserService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 * Author：汤小洋
 * Date：2023-07-19 17:20
 * Description：<描述>
 */
@Service
@Transactional(propagation = Propagation.REQUIRED,rollbackFor = Exception.class)
@RequiredArgsConstructor
public class UserServiceImpl  implements UserService {

    private final UserMapper userMapper;

    @Override
    public void add(User user) {
        userMapper.insert(user);
    }
}
